<%@ page import="org.springframework.web.bind.annotation.RequestParam" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%--
  Created by IntelliJ IDEA.
  User: sun
  Date: 2020/5/7
  Time: 4:42 下午
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>edit</title>
</head>
<%
    pageContext.setAttribute("cpt", request.getContextPath());
%>
<body>
<form:form action="${cpt}/emp/${employee.id}" modelAttribute="employee" method="post">
    <input type="hidden" name="_method" value="PUT">
    <input type="hidden" name="id" value="${employee.id}">
    lastName: ${employee.lastName}<br>
    email:<form:input path="email" /><br/>
    gender:
    男：<form:radiobutton path="gender" value="1"/>
    女：<form:radiobutton path="gender" value="0"/><br>
    dept：<form:select path="department.id" items="${depts}" itemValue="id" itemLabel="departmentName" />
    <br/>
    <input type="submit" value="确认修改">
</form:form>
</body>
</html>
